package com.finance.system.controller;

import org.springframework.stereotype.Controller;
import com.finance.framework.controller.BaseController;
import com.finance.framework.controller.Result;
import com.finance.system.bean.pojo.Region;
import com.finance.system.service.IRegionCodeService;

import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import java.util.List;


/**
 * Created by CBWL on 2017/3/15.
 */
@Controller
@RequestMapping("/regioncode")
public class RegionCodeController extends BaseController{
    @Resource
    private IRegionCodeService regionCodeService;


    /**
     * 查询区域编码信息
     * @return
     */
    @RequestMapping("/list")
    public Result list(){
        List<Region> resultBO = regionCodeService.listAll();
        return getSuccessResult(resultBO);
    }
    /**
     * 查询省份编码信息
     * @return
     */
    @RequestMapping("/province")
    public Result provinceList(){
        List<Region> resultBO = regionCodeService.provinceList();
        return getSuccessResult(resultBO);
    }

}
